Repository navigation
fix(quota-plane): canonicalise fee_period vocabulary in reconcile.py diff (#13375) - #13395
Merged
Merged
Conversation
…diff (#13375) The plan-store leg's schema admits monthly/yearly/once while the tracker's approved plan-facts schema uses month/year, so the raw-string comparison reported 9 permanent fee_period findings that were pure vocabulary noise. Canonicalise fee_period to the tracker vocabulary for comparison only; findings keep each leg's raw value and winner. Fixture tests: the store fixture now carries the schema-valid "monthly" (the old "month" value is one the real store schema rejects and masked the bug), plus a planted genuine period mismatch (monthly vs year, caught with raw values reported) and a yearly/year agreement case.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 51 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
reconcile.py's diff comparedfee_periodas a raw string across legs whose vocabularies differ by construction:Periodin the opencode fork'smodel-plan.ts) admits onlymonthly/yearly/once, andModelPlan.writeStorevalidates against it — a store row can never carrymonth/year.month/year(schema approved 2026-11-16).Since the store was seeded, every reconciliation reported 9
fee_periodfindings (winner: plan-store) that were pure vocabulary noise. The fixture masked it: its hand-written store fixture usedmonth, a value the real store schema rejects.Fix
Canonicalise
fee_periodto the tracker vocabulary for comparison only, insidediff(PERIOD_ALIASES:monthly→month,yearly→year). Neither source's vocabulary changes — the comparison is the only place the two meet, and within this repofee_periodhas no other consumer. Findings keep each leg's raw values, so a genuine period finding still shows what each source actually says and names the winner truthfully.oncehas no tracker equivalent and passes through unchanged, so a one-off fee still mismatches any recurring tracker period.Tests
test_reconcile.py:monthlyagainst trackermonth→ no-drift (this is the vocabulary case; previously masked).monthlyvs trackeryear→ exactly onefee_periodfinding, winnerplan-store, raw values{"plan-store": "monthly", "tracker": "year"}reported.yearlyvs trackeryear→ no-drift.Verification
fp_cd30072ca532094c8a3f60d74e59b6b7, run 45203801763):python3 pm-stack/provider-usage/test_reconcile.pyat reflane-zs-13375— succeeded.~/.local/share/opencode/plans.json, the registry's plan-facts block, the current snapshot): no-drift, legs plan-store 9 / tracker 9 / measured 0, zero findings — the 9 vocabulary findings are gone and no other store↔tracker drift remains. (The measured leg is empty — the snapshot freshness gap already recorded on the parent issue; it carries no values to disagree with.)For #13375. The parent reconciliation issue stays open on its remaining slices; nothing here closes it.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.